package com.xiaotu.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyConfig {
    @Bean                       //将返回值对象作为组件添加到spring容器中,该组件id默认为方法名
    public MyService myService(){
        return  new MyService();
    }
}
